<template>
	<view>
		<view class="l1" v-for="item in doctor" @click="tonext(item.name)">
			<view class="l2">
				<u-avatar :src="'http://124.93.196.45:10001'+item.avatar"></u-avatar>
				<text>{{item.name}}</text>
			</view>
			<text>职称：{{item.jobName}}</text>
			<text>职业编号：{{item.practiceNo}}</text>
			<text>从业年限：{{item.workingYears}}年</text>
			<text>擅长：{{item.goodAt}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				doctor:[],
				id:0
			}
		},
		onLoad(options) {
			this.id=options.id
			this.getdoctor()
		},
		methods: {
			getdoctor(){
				this.api.get('/prod-api/api/pet-hospital/pet-doctor/list?typeId='+this.id).then(res=>{
					this.doctor=res.data.rows
				})
			},
			tonext(name){
				uni.navigateTo({
					url:'/pages/other/pethospital/wendetail/wendetail?name='+name
				})
			}
		}
	}
</script>

<style lang="scss">
.l1{
	width: 300px;
	border: 2px solid deeppink;
	margin: 20px auto;
	display: flex;
	flex-direction: column;
}
</style>
